package com.market.plus.core.mapping.impl;

import org.springframework.stereotype.Service;

import com.market.plus.core.mapping.IDMapping;
import com.market.plus.core.mapping.MappingConfigureDataSource;


@Service("marketMappingConfigureDataSource")
public class MappingConfigureDataSourceImpl implements MappingConfigureDataSource {

   public ClassMapping getClassDomainInstance(IDMapping mapping) {
      ClassMapping classMapping = new ClassMapping(new String[] {}, new String[] {});

      if (mapping == null)
         return classMapping;

      switch (mapping) {
      /*case PARTICIPANT_LIMIT:
         classMapping.setExcludedProperties(new String[] {"createdUser","createdDate","modifyedUser","modifyedDate","news","albums","tribes","friends","relationships","comments","contentFiles"});
         break;*/
      case NEWS_LIMIT:
         classMapping.setExcludedProperties(new String[] {"createdUser","createdDate","modifyedUser","modifyedDate","participant"});
         break;
      case PERSONAL_NEWS:
         classMapping.setExcludedProperties(new String[] {"createdUser","createdDate","modifyedUser","modifyedDate","participant.city", "participant.userInfo"});
         break;
      default:
         break;
      }
      return classMapping;
   }
}
